
package com.grupobbva.iici.serializable;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="TIICI_CORPORATIVA")
public class Corporativa extends BaseDomain implements Serializable{
	
	private static final long serialVersionUID = 1L;
	@Id
	@Column(name="COD_MULT")
	private String codMult;
	@Id
	@Column(name="COD_ELE")
    private String codEle;
	@Column(name="VALOR1")
    private String valor1;
	@Column(name="VALOR2")
    private String valor2;
	@Column(name="VALOR3")
    private String valor3;
	@Column(name="VALOR4")
    private String valor4;
    
	public Corporativa() {
		// TODO Auto-generated constructor stub
	}
	
	public String getCodigoUnico(){
		return codMult+codEle;
	}
    
	public Corporativa(String codMult, String codEle) {
		super();
		this.codMult = codMult;
		this.codEle = codEle;
	}
	/**
	 * @return Returns the codEle.
	 */
	public String getCodEle() {
		return codEle;
	}
	/**
	 * @param codEle The codEle to set.
	 */
	public void setCodEle(String codEle) {
		this.codEle = codEle;
	}
	/**
	 * @return Returns the codMult.
	 */
	public String getCodMult() {
		return codMult;
	}
	/**
	 * @param codMult The codMult to set.
	 */
	public void setCodMult(String codMult) {
		this.codMult = codMult;
	}
    /**
     * @return Returns the valor1.
     */
    public String getValor1() {
        return valor1;
    }
    /**
     * @param valor1 The valor1 to set.
     */
    public void setValor1(String valor1) {
        this.valor1 = valor1;
    }
    /**
     * @return Returns the valor2.
     */
    public String getValor2() {
        return valor2;
    }
    /**
     * @param valor2 The valor2 to set.
     */
    public void setValor2(String valor2) {
        this.valor2 = valor2;
    }
    /**
     * @return Returns the valor3.
     */
    public String getValor3() {
        return valor3;
    }
    /**
     * @param valor3 The valor3 to set.
     */
    public void setValor3(String valor3) {
        this.valor3 = valor3;
    }
    /**
     * @return Returns the valor4.
     */
    public String getValor4() {
        return valor4;
    }
    /**
     * @param valor4 The valor4 to set.
     */
    public void setValor4(String valor4) {
        this.valor4 = valor4;
    }
     @Override
    public boolean equals(Object obj) {
    	 if(obj==null) return false;
    	 if(!(obj instanceof Corporativa)) return false;
    	 Corporativa corporativa=(Corporativa)obj;
    	 if(corporativa.getCodMult().equals(codMult)){
    		 if(corporativa.getCodEle().equals(codEle)){
    			 return true;
    		 }
    	 }
    	return false;
    }
}
